
package com.zdxlz.fcmp.business.controller.third.party.ict;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zdxlz.fcmp.business.dto.ict.DeviceInfoDto;
import com.zdxlz.fcmp.business.entity.IpsecVpnConfigEntity;
import com.zdxlz.fcmp.business.service.IIpsecVpnConfigService;
import com.zdxlz.fcmp.common.core.util.R;
import lombok.AllArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.zdxlz.fcmp.common.core.constant.CommonConstants.OPERATION_SUCCESS;

/**
 * 提供给ICT的IPSEC查询接口
 * @author: aman
 * @since 2025-02-08
 */
@RestController
@AllArgsConstructor
@RequestMapping("/api/v1/ict/ipsec")
public class IctIpsecConfigController {

    private IIpsecVpnConfigService ipsecVpnConfigService;

    @GetMapping
    public R getList(@ParameterObject Page<IpsecVpnConfigEntity> page, @ParameterObject DeviceInfoDto deviceInfoDto) {
        return R.ok(ipsecVpnConfigService.ictGetList(page, deviceInfoDto), OPERATION_SUCCESS);
    }

}
